package com.koala.entity;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import lombok.NonNull;
import lombok.ToString;

/**
 * @author yantingrui
 * @date 2021/12/30   12:53
 */
@Data
@ToString
public class Student extends Person {

    private String stuNo;

    public Student(String name, @NonNull Integer age) {
        super(name, age);
    }

    public static void main(String[] args) {
        Student tom = new Student("Tom", 100);
        fun(tom);
        System.out.println(JSON.toJSONString(tom));
    }

    public static void fun(Person person) {
        person.setAge(15);
    }
}
